<!DOCTYPE html>
<html lang="zh">
<head>
    <script>
        window.onload = function() {
            const urlParams = new URLSearchParams(window.location.search);
            const err = urlParams.get('err');
            if (err) {
                alert(err);
            }
        };
    </script>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>用户登录</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Arial', sans-serif;
        }
        
        body {
            background: linear-gradient(135deg, #74ebd5, #9face6);
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
        }
        
        .login-container {
            background: rgba(255, 255, 255, 0.9);
            padding: 40px;
            border-radius: 10px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
            width: 100%;
            max-width: 400px;
            text-align: center;
            transition: transform 0.3s;
        }
        
        .login-container:hover {
            transform: translateY(-5px);
        }
        
        h2 {
            color: #333;
            margin-bottom: 30px;
            font-weight: 600;
        }
        
        .input-group {
            margin-bottom: 20px;
            position: relative;
        }
        
        .input-group input {
            width: 100%;
            padding: 15px;
            border: none;
            border-bottom: 2px solid #ddd;
            background: transparent;
            font-size: 16px;
            transition: all 0.3s;
        }
        
        .input-group input:focus {
            outline: none;
            border-color: #9face6;
        }
        
        .input-group label {
            position: absolute;
            left: 15px;
            top: 15px;
            color: #999;
            transition: all 0.3s;
            pointer-events: none;
        }
        
        .input-group input:focus + label,
        .input-group input:valid + label {
            top: -10px;
            font-size: 12px;
            color: #9face6;
        }
        
        button {
            width: 100%;
            padding: 15px;
            background: linear-gradient(to right, #74ebd5, #9face6);
            border: none;
            border-radius: 30px;
            color: white;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.3s;
            margin-top: 20px;
        }
        
        button:hover {
            background: linear-gradient(to right, #9face6, #74ebd5);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }
        
        .footer {
            margin-top: 30px;
            font-size: 14px;
            color: #666;
        }
        
        .footer a {
            color: #9face6;
            text-decoration: none;
            transition: all 0.3s;
        }
        
        .footer a:hover {
            color: #74ebd5;
            text-decoration: underline;
        }
    </style>
    <link rel="icon" href="{{ url_for('static', filename='img/1.png') }}" type="image/x-icon">
</head>
<body>
    <div class="login-container">
        <h2>欢迎登录</h2>
        <form id="loginForm" method="POST">
            <div class="input-group">
                <input type="text" id="username" name="username" required>
                <label for="username">用户名</label>
            </div>
            <div class="input-group">
                <input type="password" id="password" name="password" required>
                <label for="password">密码</label>
            </div>
            <button type="submit">登 录</button>
        </form>
        <div class="footer">
            <a href="#">忘记密码?</a> | <a href="#">注册账号</a>
        </div>
    </div>
</body>
</html>